package kr.memberAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import kr.controller.Action;

public class LoginAction implements Action{
	@Override
	public String execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		HttpSession session = request.getSession();
		if(session.getAttribute("memId")==null)
			return "/member/loginForm.do";
		if(session.getAttribute("memId").equals("admin"))
			return "/admin/adList.jsp";
		
		return "/list/board.do";
		
	}

}
